<%@page import="java.util.ArrayList"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="user.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
    ArrayList<User> users=new ArrayList<>();
    for(int i=1;i<=10;i++){
    	User user=new User(i,"user"+i,""+i);
    	users.add(user);
    }
    pageContext.setAttribute("users1",users);
    
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>Insert title here</title>
</head>
<body>

	<table border="1" cellspacing="0" align="center" >
		<tr>
			<th>用户ID</th>
			<th>用户名</th>
			<th>密码</th>
		</tr>
		<c:forEach var="users" items="${users1}">
		<tr>
			<td>${users.user_id}</td>
			<td>${users.user_name}</td>
			<td>${users.user_password}</td>
		</tr>
		</c:forEach>
	</table>
</body>
</html>